package com.ssm.service.impl;

import com.ssm.bean.Department;
import com.ssm.dao.DepartmentMapper;
import com.ssm.service.interfaces.IDepartmentSV;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Copyright: Copyright (c) 2018/1/24
 * Description:
 * CLASS_NAME: DepartmentSVImpl
 * PACKAGE_NAME: com.ssm.service.impl
 * version: v1.0.0
 * author: Jin Biao
 * date: 2018/1/24 11:06
 */

@Service
public class DepartmentSVImpl implements IDepartmentSV {
    @Autowired
    private DepartmentMapper departmentMapper;

    /** @method_name:  getAllDepts
    * @param:  null
    * @description: 查询所有的department
    * @create_user: Jin Biao
    * @create_date: 2018/1/24
    * @create_time: 11:08
    **/
    public List<Department> getAllDepts() throws Exception {
        List<Department> departmentList = departmentMapper.selectByExample(null);
        return departmentList;
    }
}
